Data storage system and managing method thereof

ABSTRACT

A method for managing a data storage system is provided. The data storage system includes a primary storage device and a spare storage device. The primary storage device includes a plurality of sections. The method first judges whether the primary storage device conforms to a first standard. Once the judging result is NO, the primary storage device is replaced with the spare storage device. The method then scans the primary storage device, checks which sections are failed in the primary storage device, and locates the failed sections. Then, the method repairs the failed sections that can be repaired and judges whether the primary storage device conforms to a second standard. If the primary storage device conforms to the second standard, the method sets the primary storage device as a new spare storage device.

BACKGROUND OF THE INVENTION

1. Field of the Invention

This invention relates to data storage systems. More specifically, theinvention is related to data storage systems including spare storagedevices.

2. Description of the Prior Art

The demand for data storage protection and capacity in computernetworking environments increases substantially each year. Internet useand data-intensive applications, such as multimedia and onlinetransaction processes, have contributed to the increased demand for datastorage capacity. Undoubtedly, the reliability of data storage systemsis a significant issue as well.

To prevent important data from being damaged when a data storage systemfails, most data storage systems has built-in preventing mechanism.

A conservative preventing mechanism discards a primary storage deviceonce a few abnormalities occur in the primary storage device and replacethe primary storage device with a spare storage device. In this way, thepossibility of data being damaged is decreased. However, users must paymore maintenance fee. On the other hand, an aggressive preventingmechanism discards a primary storage device until more abnormalitiesoccur in the primary storage device. By contrast, an aggressivepreventing mechanism saves maintenance fee at the expense of reliabilityof data storage systems. Accordingly, adopting which preventingmechanism has been a bothersome problem for users.

SUMMARY OF THE INVENTION

To solve aforementioned problems, this invention provides a data storagesystem and a managing method thereof. When a primary storage device ofone data storage system is detected as abnormal, this invention firstcopies the data stored in the primary storage device into a sparestorage device such that the primary storage device can be replaced withthe spare storage device. Then, the data storage system and the managingmethod thereof according to this invention scan all the sections in theprimary storage device and try to repair the failed sections. If mostsections in the primary storage device are still usable after beingrepaired, this invention sets the primary storage device as a new sparestorage device instead of directly discarding the primary storagedevice. Thus, this invention can considerably reduce the resources andthe maintenance fee for data storage systems.

The first preferred embodiment according to this invention is a datastorage system. The data storage system includes a primary storagedevice, a spare storage device, a judging module, a replacing module, anexamining module, and a repairing module. The primary storage deviceincludes a plurality of sections for storing data. The judging module isused for judging whether the primary storage device conforms to a firststandard. The replacing module is operated by the judging module. Oncethe judging result of the judging module is NO, the replacing modulereplaces the primary storage device with the spare storage device. Theexamining module is used for scanning the primary storage device,checking which sections are failed in the primary storage device, andlocating the failed sections. The repairing module is used for checkingwhether the failed sections located by the examining module can berepaired. If there is any failed section that can be repaired, therepairing module repairs the failed sections that can be repaired andthen judges whether the primary storage device conforms to a secondstandard. If the primary storage device conforms to the second standard,the repairing module sets the primary storage device as a new sparestorage device.

The second preferred embodiment according to this invention is amanaging method for a data storage system. The data storage systemincludes a primary storage device and a spare storage device. Theprimary storage device includes a plurality of sections. The methodfirst judges whether the primary storage device conforms to a firststandard. Once the judging result is NO, the primary storage device isreplaced with the spare storage device. The method then scans theprimary storage device, checks which sections are failed in the primarystorage device, and locates the failed sections. Then, the methodrepairs the failed sections that can be repaired and judges whether theprimary storage device conforms to a second standard. If the primarystorage device conforms to the second standard, the method sets theprimary storage device as a new spare storage device.

The advantage and spirit of the invention may be understood by thefollowing recitations together with the appended drawings.

BRIEF DESCRIPTION OF THE APPENDED DRAWINGS

FIG. 1A is the block diagram of the data storage system according to thefirst preferred embodiment of this invention.

FIG. 1B is a detailed embodiment of the first preferred embodiment shownin FIG. 1A.

FIG. 2A is the flow chart of the managing method according to the secondpreferred embodiment of this invention.

FIG. 2B is a detailed embodiment of the second preferred embodimentshown in FIG. 2A.

DETAILED DESCRIPTION OF THE INVENTION

This invention provides a data storage system and a managing methodthereof.

Please refer to FIG. 1A. The data storage system of the first preferredembodiment according to this invention is disclosed in FIG. 1A. The datastorage system 10 includes a primary storage device 11, a spare storagedevice 12, a judging module 13, a replacing module 14, an examiningmodule 15, and a repairing module 16. The primary storage device 11 andthe spare storage device 12 can both be disk drives.

The primary storage device 11 includes a plurality of sections forstoring data. The judging module 13 can be operated constantly or inresponse to a user command. The judging module 13 is used for judgingwhether the primary storage device 11 conforms to a first standard. Thereplacing module 14 is operated by the judging module 13. Once thejudging result of the judging module 13 is NO, the replacing module 14replaces the primary storage device 11 with the spare storage device 12.The examining module 15 is used for scanning the primary storage device11, checking which sections are failed in the primary storage device 11,and locating the failed sections. After the replacing module 14 replacesthe primary storage device 11 with the spare storage device 12, theexamining module 15 subsequently scans the primary storage device 11 andchecks whether the failed sections located by the examining module 15can be repaired. If there is any failed section that can be repaired,the repairing module 16 repairs the failed sections that can be repairedand then judges whether the primary storage device 11 conforms to asecond standard. If the primary storage device 11 conforms to the secondstandard, the repairing module 16 sets the primary storage device 11 asa new spare storage device. If the primary storage device 11 does notconform to the second standard, the repairing module 16 sets the primarystorage device 11 as a new spare storage device.

As shown in FIG. 1B, the judging module 13 can include a detecting unit13A, a first counting unit 13B, and a judging unit 13C. The detectingunit is used for detecting whether an abnormality occurs in any sectionof the primary storage device 11. The first counting unit 13B is usedfor counting the number of abnormalities detected by the detecting unit13A. The judging unit 13C is used for judging whether number ofabnormalities counted by the first counting unit 13B is larger than afirst predetermined threshold. In the preferred embodiment shown in FIG.1B, the number of abnormalities in the primary storage device 11 is setas the judging basis of the first standard.

Similarly, when the repairing module 16 judges whether the primarystorage device 11 conforms to a second standard, a second counting unit(not shown in the figures) can be used. The second counting unit countsthe number of sections that cannot be repaired and judging whether thenumber of sections that cannot be repaired is smaller than a secondpredetermined threshold. If the number of sections that cannot berepaired is smaller than the second predetermined threshold, the primarystorage device 11 is considered as conforming to the second standard.Thus, the repairing module 16 can set the primary storage device 11 as anew spare storage device. On the contrary, if the number of sectionsthat cannot be repaired is larger than the second predeterminedthreshold, the repairing module 16 sets the primary storage device 11 asa new spare storage device.

In actual applications, some data storage systems synchronously storedata in the primary storage device 11 and the spare storage device 12 atthe beginning. In this case, the replacing module 14 can directlyreplace the primary storage device 11 with the spare storage device 12and doesn't need to copy the data form the primary storage device 11into the spare storage device 12 first. On the other side, data storagesystem may not have aforementioned synchronously storing function. Inthat case, the replacing module 14 must first copy the data stored inthe primary storage device 11 into the spare storage device 12 beforereplacing the primary storage device 11.

In actual applications, there can be a variety of repairing methods forthe repairing module 16 to repair the primary storage device 11. Manydata storage systems have self-repairing abilities. If the primarystorage device 11 has self-repairing abilities, the repairing module 16can also start the self-repairing mechanism to repair the failedsections.

In actual applications, if the repairing module 16 judges the primarystorage device 11 as a failed storage device, the data storage system 10may further add a new spare storage device.

The second preferred embodiment according to this invention is amanaging method for a data storage system. The data storage systemincludes a primary storage device and a spare storage device. Theprimary storage device includes a plurality of sections for storingdata. Please refer to FIG. 2A. FIG. 2A shows the flow chart of thismanaging method.

In this preferred embodiment, step S21 is first performed to judgewhether the primary storage device conforms to a first standard. Oncethe judging result of step S21 is NO, step S22 is performed to replacesthe primary storage device with the spare storage device. Step S23includes scanning the primary storage device, checking which sectionsare failed in the primary storage device, and locating the failedsections. Step S24 is checking whether the failed sections located instep S23 can be repaired. If there is any failed sections can berepaired that can be repaired, step S24 also repairs the failed sectionsthat can be repaired. Step S25 is judging whether the primary storagedevice conforms to a second standard. If the judging result of step S25is YES, step S26 is performed to set the primary storage device as a newspare storage device. If the judging result of step S25 is NO, step S27is performed to set the primary storage device as failed storage device.

FIG. 2B shows a detailed example of the aforementioned managing method.Step S31 is first performed to detect whether an abnormality occurs inany section of the primary storage device. If there is any abnormality,step S32 is performed to add one to the number of abnormalities. StepS33 is judging whether the number of abnormalities is larger than afirst predetermined threshold. If the judging result of step S33 is NO,the method continuously performs step S31. If the judging result of stepS33 is YES, the method performs step S34 to replace the primary storagedevice with the spare storage device. After the primary storage deviceis replaced with the spare storage device, step S35 then scans theprimary storage device, checks which sections are failed in the primarystorage device, and locates the failed sections. Step S36 is checkingwhether the failed sections located in step S35 can be repaired. Ifthere is any failed sections can be repaired, step S36 also repairs thefailed sections that can be repaired and counts the number of sectionsthat cannot be repaired. Step S37 is judging whether the number ofsections that cannot be repaired is smaller than a second predeterminedthreshold. If the judging result of step S37 is YES, step S38 is thenperformed to set the primary storage device as a new spare storagedevice. On the contrary, if the judging result of step S37 is NO, stepS39 is then performed to set the primary storage device as a failedstorage device.

As shown in the aforementioned embodiments, when the primary storagedevice in a data storage system has too many abnormalities, thisinvention can first replace the primary storage device with the sparestorage device. Subsequently, the data storage system and the managingmethod thereof according to this invention scan try to repair the failedsections. If most sections in the primary storage device are stillusable after being repaired, this invention sets the primary storagedevice as a new spare storage device instead of directly discarding theprimary storage device. Thus, this invention can considerably reduce theresources and the maintenance fee for data storage systems. The datastorage system and the managing method thereof according to thisinvention can also be used in data storage systems including a pluralityof primary storage devices and a plurality of spare storage devices, forinstance, redundant array of independent disks (RAIDs).

In comparison with prior arts, this invention balances the reliabilityand the maintenance fee of data storage systems with a simple managingmethod.

With the example and explanations above, the features and spirits of theinvention will be hopefully well described. Those skilled in the artwill readily observe that numerous modifications and alterations of thedevice may be made while retaining the teaching of the invention.Accordingly, the above disclosure should be construed as limited only bythe metes and bounds of the appended claims.

What is claimed is:
 1. A data storage system, comprising: a primarystorage device comprising a plurality of sections for storing data; aspare storage device; a judging module for judging whether the primarystorage device conforms to a first standard; a replacing module operatedby the judging module, once the judging result of the judging module isNO, the replacing module replacing the primary storage device with thespare storage device; an examining module for scanning the primarystorage device, checking which sections are failed in the primarystorage device, and locating the failed sections; and a repairing modulefor checking whether the failed sections located by the examining modulecan be repaired, if any, the repairing module repairing the failedsections that can be repaired and then judging whether the primarystorage device conforms to a second standard, if the primary storagedevice conforms to the second standard, the repairing module setting theprimary storage device as a new spare storage device.
 2. The datastorage system of claim 1, wherein the judging module comprises: adetecting unit for detecting whether an abnormality occurs in anysection of the primary storage device; a first counting unit forcounting the number of abnormalities detected by the detecting unit; anda judging unit for judging whether number of abnormalities counted bythe first counting unit is larger than a first predetermined threshold.3. The data storage system of claim 1, wherein the repairing modulecomprises: a second counting unit operated when the repairing modulejudges whether the primary storage device conforms to a second standard,the second counting unit counting the number of sections that cannot berepaired and judging whether the number of sections that cannot berepaired is smaller than a second predetermined threshold.
 4. The datastorage system of claim 1, wherein if the primary storage device doesnot conform to the second standard, the repairing module sets theprimary storage device as a new spare storage device.
 5. The datastorage system of claim 1, wherein the judging module operatesconstantly or in response to a user command.
 6. The data storage systemof claim 1, wherein the replacing module replaces the primary storagedevice with the spare storage device by copying the data stored in theprimary storage device into the spare storage device.
 7. The datastorage system of claim 1, wherein the primary storage device and thespare storage device are both disk drives.
 8. A managing method for adata storage system, said data storage system comprising a primarystorage device and a spare storage device, the primary storage devicecomprising a plurality of sections for storing data, the methodcomprising the steps of: (a) judging whether the primary storage deviceconforms to a first standard; (b) once the judging result of step (a) isNO, replacing the primary storage device with the spare storage device;(c) scanning the primary storage device, checking which sections arefailed in the primary storage device, and locating the failed sections;and (d) checking whether the failed sections located in step (c) can berepaired, if any, repairing the failed sections that can be repaired andthen judging whether the primary storage device conforms to a secondstandard, if the primary storage device conforms to the second standard,setting the primary storage device as a new spare storage device.
 9. Themanaging method of claim 8, wherein step (a) comprises the sub-steps:(a1) detecting whether an abnormality occurs in any section of theprimary storage device; (a2) counting the number of abnormalitiesdetected in sub-step (a1); and (a3) judging whether number ofabnormalities counted in sub-step (a2) is larger than a firstpredetermined threshold.
 10. The managing method of claim 8, wherein instep (d), when judging whether the primary storage device conforms to asecond standard, the following sub-step is performed: (d1) counting thenumber of sections that cannot be repaired and judging whether thenumber of sections that cannot be repaired is smaller than a secondpredetermined threshold.
 11. The managing method of claim 8, wherein ifthe primary storage device does not conform to the second standard, theprimary storage device is set as a failed storage device.
 12. Themanaging method of claim 8, wherein step (a) is performed constantly orin response to a user command.
 13. The managing method of claim 8,wherein in step (b), the primary storage device is replaced with thespare storage device by copying the data stored in the primary storagedevice into the spare storage device.
 14. The managing method of claim8, wherein the primary storage device and the spare storage device areboth disk drives.